import { createRouter, createWebHashHistory } from "vue-router";
const routes = [
    {
        path: '/',
        redirect: '/layout'
    },
    {
        path: "/layout",
        name: 'layout',
        component: () => import('@/components/layout.vue'),
        children: [
            {
                path: '/home',
                name: 'home',
                meta: {
                    menuName: "首页"
                },
                component: () => import('@/views/home.vue')
            },
            {
                path: '/about',
                name: 'about',
                meta: {
                    menuName: "关于"
                },
                component: () => import('@/views/about.vue')
            },
        ]
    }
]
const router = createRouter({
    history: createWebHashHistory(),
    routes
})
export default router